/**
 * 
 */
package com.aaron.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * @author aaron
 * 
 */
public interface UserService extends RemoteService {
	public static final String SERVICE_URI = "/VivCode/user";

	public static class Util {

		public static UserServiceAsync getInstance() {

			UserServiceAsync instance = (UserServiceAsync) GWT
					.create(UserService.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(SERVICE_URI);
			return instance;
		}
	}
	public User login(String username, String password)throws Exception;
	public void logout(String auth);
	public User getUser(String auth)throws Exception;
}
